/*
可以怎么样封装呢？
Array.prototype.unshift.数组的get和set
2.过期的处理 存的时候加时间戳 取的时候判断是否过期
 */
class LocalStorage {
    constructor(args,values) {
        this.data = args
        this.values = values
    }
    getItem(args) {
        let resArr = []
        for (let i = 0; i < args.length; i ++) {
            resArr.push(localStorage.getItem(args[i]))
        }
        return resArr
    }
    setItem(args,values) {
        for (let i = 0; i < args.length; i ++) {
            localStorage.setItem(args[i],values[i])
        }
    }

}
let myLocal = new LocalStorage()
myLocal.setItem(["zeng","cai"],[1,2])
